package net.wanho.client;

import net.wanho.entity.User;
import net.wanho.vo.AjaxResult;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * Author：汤小洋
 * Date：2025-02-18 10:32
 * Description：<描述>
 */
@Component
public class UserClientFallback implements UserClient{
    @Override
    public String test() {
        return "请示失败";
    }

    @Override
    public AjaxResult findByName(String name) {
        System.out.println("服务熔断开启。。。。。。。");
        return AjaxResult.error("获取用户信息失败");
    }

    @Override
    public AjaxResult removeById(Integer id) {
        return AjaxResult.error("删除用户失败");
    }

    @Override
    public AjaxResult addUser(User user) {
        return AjaxResult.error("添加用户失败");
    }

    @Override
    public AjaxResult modifyUser(User user) {
        return AjaxResult.error("修改用户失败");
    }

    @Override
    public AjaxResult query(Map<String, Object> params) {
        return AjaxResult.error("查询用户失败");
    }
}
